package IO;

import java.io.UnsupportedEncodingException;

public class est {
    public static void main(String[] args) throws Exception {
        // 对"中国"进行编码
String s1 = "中国" ;
byte[] bytes = s1.getBytes();// 

// 对上述得到的字节数组进行编码
String s2 = new String(bytes , "UTF-8") ;
System.out.println(s2);
    }
}
